package de.mhus.lib.mandala;

import de.mhus.lib.mandala.text.Text;

public abstract class AbstractComponent extends Component {

	protected Text caption;

	public AbstractComponent(String caption) {
		setCaption(caption);
	}
	
	public Text getCaption() {
		return caption;
	}

	public void setCaption(Text caption) {
		this.caption = caption;
	}
	
	public void setCaption(String caption) {
		if (caption == null)
			this.caption = null;
		else
			this.caption = new Text(caption);
	}
	
}
